package connectfour;

import java.util.ArrayList;
import java.util.List;

public class Grid {
	
	List<Block> grid = new ArrayList<Block>(7);
	
	//constructor
	public Grid(){
		@SuppressWarnings("unused")
		List<Block> grid = new ArrayList<Block>(7);
		@SuppressWarnings("unused")
		Block block = new Block();

		initializeGrid();
	}
	
	public void initializeGrid(){
		Block block = new Block();
		for (int i=0; i<7; i++){
			grid.add(block);
		}
	}

	public void setRed(int row, int column) {
		grid.get(column).setRed(row);		
	}
	
	public void setYellow(int row, int column) {
		grid.get(column).setYellow(row);		
	}

	public int getContent(int row, int column) {
		return grid.get(column).getBlockContent(row);
	}
	
	public boolean isUnfilled(int row, int column){
		if (grid.get(column).getBlockContent(row)==0) return true;
		else return false;
	}

}

